Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Sams Teach Yourself MCSE Windows NT Server 4 in 14 Days
(Publisher: Macmillan Computer Publishing)
Author(s): David Schaer, et al
ISBN: 0672311283
Publication Date: 12/15/97

Bookmark It

Search this book:
 
Previous Table of Contents Next


11.2. Dynamic Host Configuration Protocol

In a network based on the TCP/IP protocol, every node on the network must be assigned a unique IP address. In a large networked environment, assigning and managing these addresses manually can become quite a time-consuming project. You run into problems such as the following:

  Determining the addressing scheme for assigning IP addresses
  Correcting problems caused by users who do not have the knowledge to correctly configure a network client computer
  Managing the pool of addresses when computers are removed or retired

The Dynamic Host Configuration Protocol (DHCP) is a method of lessening this administrative burden. A DHCP server is used to dynamically assign IP addresses while offering centralized management of IP addresses on a TCP/IP-based network. DHCP also offers the capability to assign other parameters along with the IP assignment, such as the location of WINS servers, DNS servers, default gateways, and node type.

Although optional parameters may be provided by the DHCP server, the IP address and subnet mask are always included. Any settings that might already be manually configured on the client will override parameters assigned by the DHCP server, including the IP address and subnet mask.

Before a client on an IP network can communicate, the host must initialize TCP/IP, which requires a unique IP address and a subnet mask as a minimum. These can be entered manually on each host machine or assigned dynamically by a DHCP server.

Although the acquisition of an IP address from a DHCP server results in increased network traffic, the amount of traffic generated is not significant. The two types of DHCP traffic are address acquisition and address renewal.

11.2.1. DHCP Address Acquisition

Upon booting, the host machine broadcasts a request for an IP address. Because TCP/IP has not initialized, packets requesting this IP address must be broadcast. However, each of these four frames are 342 bytes in size, for a total size of about 1,368 bytes, and take about 1/3 of a second to transmit. Figure 11.1 shows these four packets using Network Monitor.


Figure 11.1.  Network Monitor showing the four packets of address acquisition. Notice frames 1874, 1875, 1876, and 1877.

These four packets are

  DHCPDISCOVER packet. This packet is broadcast by the client to locate a DHCP server from which the client can acquire an IP address.
  DHCPOFFER packet. All available DHCP servers receive the request. Each one determines whether it can fulfill the request and then sends a packet containing an available IP address.
  DHCPREQUEST packet. The client selects one of the offers, if multiple ones are received, and sends a packet back informing the DHCP server of its acceptance.
  DHCPACK packet. This packet is sent from the server to the client and contains the length of the lease and any optional TCP/IP parameters.

DHCP is an extension of the BOOTP protocol, which enables diskless clients to boot up and configure TCP/IP parameters. As such, DHCP can only pass over routers on your network that support RFC 1542 and can act as BOOTP relay agents.

11.2.2. Configuring the DHCP Client

All Microsoft clients, with the exception of LAN Manager for OS/2, can be configured to use DHCP. Setting up a client to use DHCP is simply a matter of setting its TCP/IP properties to use a DHCP server. The rest is automatic. Go to Control Panel/Network/Protocols. Select the TCP/IP component and choose Properties, which will bring up the property sheet shown in Figure 11.2.


Figure 11.2.  A client is configured to use DHCP.

Simply choose the radio button Obtain an IP Address Automatically and the client computer is configured. Restart the computer when Windows asks you to.

You can confirm the new IP lease at the client by typing ipconfig /all at a command prompt (see Figure 11.3).


Figure 11.3.  ipconfig /all provides full IP lease details on an NT client.

You can use ipconfig for more than just verifying your IP configuration. Use ipconfig /release to cause the client to give up its lease and notify the DHCP server. Use ipconfig /renew to update a current lease or obtain a new one after releasing the old one.

11.2.3. DHCP Address Renewal

The client attempts to renew its IP address lease every time it reboots. In addition, if the client is left up long enough, it will attempt to renew after 50 percent, 87.5 percent, and 100 percent of its lease period has elapsed. Because TCP/IP is already initialized and the client and server know about each other, this renewal is sent via directed packets and consists of only two packets:

  DHCPREQUEST. The client sends a request to renew its lease.
  DHCPAck. If the renewal is successful, the DHCP server sends an acknowledgment to the client, which resets the lease period.

These packets are the same size as those used for acquisition (342 bytes each), for a total of 684 bytes, and take 200 milliseconds to complete. Figure 11.4 shows these packets using Network Monitor.


Figure 11.4.  Network Monitor showing address acquisition. Notice frames 322 and 323.

11.2.4. Configuring the DHCP Server

Configuring the DHCP server requires a little more effort, including the following:

  If you are configuring DHCP on a single subnet or if your routers can act as BOOTP relay agents, you must configure only one DHCP server to handle your network.
  If your routers cannot act as BOOTP relay agents, you need a DHCP server for each subnet or a DHCP relay agent.
  A DHCP relay agent may be located on your router or on the subnet segment that is without a DHCP server.
  The DHCP server must be configured with a static IP address. The DHCP server cannot also be a DHCP client.
  A pool of IP addresses must be assigned to the DHCP server, which it can assign to clients.
  The DHCP server must be running Windows NT Server (it does not have to be a domain controller), and the DHCP service must be installed.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.